function show_app_main()
{
 setInnerHTML("test", "main_div");
}

function show_user_login(data)
{
  dojo.require("dojo.parser");
  dojo.require("dijit.form.Form");
  dojo.require("dijit.form.ValidationTextBox");
  dojo.require("dijit.form.Button");
  dojo.require("dijit.layout.TabContainer");
  dojo.require("dijit.layout.ContentPane");
  dojo.require("dijit.layout.LayoutContainer");

  //dojo.byId("main_div").setContent("<div id='target'></div>");
  var main = new dijit.layout.ContentPane({}, dojo.byId("main_div"));
  main.startup();
  main.setContent("<div id=\"target\" class=\"fullsize\"></div>");

  var tabscont = new dijit.layout.TabContainer({"class": "fullsize"}, dojo.byId("target"));

  var loginform = new dijit.form.Form({method: "post"});
  var loginlayout = new dijit.layout.LayoutContainer({title: "Log-In", "class": ""});
  var titlerow = new dijit.layout.ContentPane({"class": "title"});
  var unrow = new dijit.layout.ContentPane({"class": ""});
  var pwrow = new dijit.layout.ContentPane({"class": ""});
  var btnrow = new dijit.layout.ContentPane({"class": ""});

  var loginuname = new dijit.form.ValidationTextBox({type: "text", id: "login_username", lowercase: true, name: "username", promptMessage: "Please enter your username."});
  var loginpassw = new dijit.form.ValidationTextBox({type: "password", id: "login_password", name: "password", promptMessage: "Please enter your password."});
  var loginbuttn = new dijit.form.Button({label: "Log In", type: "submit"});

  var lostpassform = new dijit.form.Form({method: "post"});
  var lostpasslayout = new dijit.layout.LayoutContainer({title: "Lost Password", "class": ""});

  var titlerow2 = new dijit.layout.ContentPane({"class": "title"});
  var unrow2 = new dijit.layout.ContentPane({"class": ""});
  var btnrow2 = new dijit.layout.ContentPane({"class": ""});
  var lpuname = new dijit.form.ValidationTextBox({type: "text", id: "lostpass_username", lowercase: true, name: "username", promptMessage: "Please enter your username."});
  var lpbuttn = new dijit.form.Button({label: "Log In", type: "submit"});

  titlerow.setContent("<div class=\"titler\">Logging in</div>");
  unrow.setContent(loginuname.domNode);
  pwrow.setContent(loginpassw.domNode);
  btnrow.setContent(loginbuttn.domNode);

  loginlayout.addChild(titlerow);
  loginlayout.addChild(unrow);
  loginlayout.addChild(new dijit.layout.ContentPane({"class": "spacer"}));
  loginlayout.addChild(pwrow);
  loginlayout.addChild(new dijit.layout.ContentPane({"class": "spacer"}));
  loginlayout.addChild(btnrow);

  titlerow2.setContent("<div class=\"titler\">Lost password recovery</div>");
  unrow2.setContent(lpuname.domNode);
  btnrow2.setContent(lpbuttn.domNode);

  lostpasslayout.addChild(titlerow2);
  lostpasslayout.addChild(unrow2);
  lostpasslayout.addChild(new dijit.layout.ContentPane({"class": "spacer"}));
  lostpasslayout.addChild(btnrow2);

  tabscont.addChild(loginlayout);
  tabscont.addChild(lostpasslayout);

  tabscont.startup();
}
